import request from "@/utils/request";

// 获取答题练习记录列表
export function getList(data) {
  return request({
    url: "/api/exam/temsExamStudy/getList",
    method: "post",
    data,
  });
}
// 获取答题练习记录
export function getInfo(id) {
  return request({
    url: `/api/exam/temsExamStudy/${id}`,
    method: "get",
  });
}
// 获取答题练习记录详情
export function getDetail(id) {
  return request({
    url: `/api/exam/temsExamStudy/detail/${id}`,
    method: "get",
  });
}
// 错题集
export function getWrongQuestionList(id) {
  return request({
    url: `/api/exam/temsExamStudy/getWrongQuestionList`,
    method: "get",
  });
}
// 删除答题练习记录
export function Delete(id) {
  return request({
    url: `/api/exam/temsExamStudy/${id}`,
    method: "DELETE",
  });
}
// 修改答题练习记录
export function Update(data) {
  return request({
    url: `/api/exam/temsExamStudy/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建答题练习记录
export function Create(data) {
  return request({
    url: "/api/exam/temsExamStudy",
    method: "post",
    data,
  });
}

// 生成每日练习答题练习记录
export function generatorEverydayQuestion(data) {
  return request({
    url: "/api/exam/temsExamStudy/generatorEverydayQuestion",
    method: "post",
    data,
  });
}

// 保存每日答题作答
export function saveEverydayQuestionResult(data) {
  return request({
    url: `/api/exam/temsExamStudy/saveEverydayQuestionResult`,
    method: "PUT",
    data,
  });
}

// 生成兴趣答题练习记录
export function generatorInterestQuestion(data) {
  return request({
    url: "/api/exam/temsExamStudy/generatorInterestQuestion",
    method: "post",
    data,
  });
}

// 保存兴趣答题作答
export function saveInterestQuestionResult(data) {
  return request({
    url: `/api/exam/temsExamStudy/saveInterestQuestionResult`,
    method: "PUT",
    data,
  });
}

// 每日答题、兴趣答题 完成作答保存
export function saveCompleteTheAnswer(data) {
  return request({
    url: `/api/exam/temsExamStudy/saveCompleteTheAnswer`,
    method: "PUT",
    data,
  });
}

// 生成模拟、自主答题练习记录
export function generatorSimulateQuestion(data) {
  return request({
    url: "/api/exam/temsExamStudy/generatorSimulateQuestion",
    method: "post",
    data,
  });
}

// 保存模拟、自主答题作答
export function saveSimulateQuestionResult(data) {
  return request({
    url: `/api/exam/temsExamStudy/saveSimulateQuestionResult`,
    method: "PUT",
    data,
  });
}

// 学院监控
export function selectUserMonitor(data) {
  return request({
    url: `/api/exam/temsExamStudy/selectUserMonitor`,
    method: "post",
    data,
  });
}

// 数据分析
export function selectWrongQuestionAnalysis(data) {
  return request({
    url: `/api/exam/temsExamStudy/selectWrongQuestionAnalysis`,
    method: "post",
    data,
  });
}
